﻿using System.Collections.Generic;
using Authority.Model;
using Tool.Model;

namespace Authority.Logic
{
    /// <summary>
    /// 按钮功能管理逻辑接口
    /// </summary>
    public interface ISysButtonService
    {
        /// <summary>
        /// 分页获取所有的可操作按钮
        /// </summary>
        /// <param name="parametersInfo"></param>
        /// <returns></returns>
        ResultJsonInfo<List<SysButtonEntity>> LoadSysButtonList(ParametersInfo<string> inputInfo);

        /// <summary>
        /// 根据Code获取操作按钮
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        ResultJsonInfo<int> Save(ButtonsOperateRequest inputInfo);

        /// <summary>
        /// 删除信息
        /// </summary>
        /// <param name="parameters"></param>
        /// <returns></returns>
        ResultJsonInfo<int> Remove(List<string> gCodeList);

        /// <summary>
        /// 保存当前用所拥有的按钮权限到Redis
        /// </summary>
        /// <param name="roleCodes"></param>
        void AddButtonsCacheToRedis(string roleCodes);

        /// <summary>
        /// 获取Redis中的按钮权限
        /// </summary>
        /// <returns></returns>
        ResultJsonInfo<SysUserRoleButtonsHtmlInfo> LoadButtonsCacheFromRedis(string path);
    }
}
